<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use App\Repository\PermissionRepository;

/**
 * Permission
 *
 * @ORM\Table(name="permission", indexes={@ORM\Index(name="idx_is_default", columns={"is_default"}), @ORM\Index(name="idx_is_menu", columns={"is_menu"}), @ORM\Index(name="idx_route", columns={"route"})})
 * @ORM\Entity(repositoryClass=PermissionRepository::class)
 */
class Permission
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer", nullable=false, options={"comment"="主键ID自增"})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="route", type="string", length=255, nullable=false, options={"comment"="路由名字"})
     */
    private $route = '';

    /**
     * @var string
     *
     * @ORM\Column(name="route_name", type="string", length=255, nullable=false, options={"comment"="路由文言"})
     */
    private $routeName = '';

    /**
     * @var int
     *
     * @ORM\Column(name="parent_id", type="integer", nullable=false, options={"comment"="父ID"})
     */
    private $parentId = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="group_name", type="string", length=255, nullable=false, options={"comment"="分组名"})
     */
    private $groupName = '';

    /**
     * @var string
     *
     * @ORM\Column(name="icon_name", type="string", length=255, nullable=false, options={"comment"="css图标"})
     */
    private $iconName = '';

    /**
     * @var int
     *
     * @ORM\Column(name="is_menu", type="integer", nullable=false, options={"comment"="是否菜单"})
     */
    private $isMenu = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="is_default", type="integer", nullable=false, options={"comment"="默认权限"})
     */
    private $isDefault = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="is_del", type="integer", nullable=false, options={"comment"="0否1是"})
     */
    private $isDel = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="create_user", type="integer", nullable=false, options={"comment"="创建人"})
     */
    private $createUser = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="create_time", type="integer", nullable=false, options={"comment"="创建时间"})
     */
    private $createTime = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="update_user", type="integer", nullable=false, options={"comment"="修改人"})
     */
    private $updateUser = '0';

    /**
     * @var int
     *
     * @ORM\Column(name="update_time", type="integer", nullable=false, options={"comment"="修改时间"})
     */
    private $updateTime = '0';

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getRoute(): ?string
    {
        return $this->route;
    }

    public function setRoute(string $route): static
    {
        $this->route = $route;

        return $this;
    }

    public function getRouteName(): ?string
    {
        return $this->routeName;
    }

    public function setRouteName(string $routeName): static
    {
        $this->routeName = $routeName;

        return $this;
    }

    public function getParentId(): ?int
    {
        return $this->parentId;
    }

    public function setParentId(int $parentId): static
    {
        $this->parentId = $parentId;

        return $this;
    }

    public function getGroupName(): ?string
    {
        return $this->groupName;
    }

    public function setGroupName(string $groupName): static
    {
        $this->groupName = $groupName;

        return $this;
    }

    public function getIconName(): ?string
    {
        return $this->iconName;
    }

    public function setIconName(string $iconName): static
    {
        $this->iconName = $iconName;

        return $this;
    }

    public function getIsMenu(): ?int
    {
        return $this->isMenu;
    }

    public function setIsMenu(int $isMenu): static
    {
        $this->isMenu = $isMenu;

        return $this;
    }

    public function getIsDefault(): ?int
    {
        return $this->isDefault;
    }

    public function setIsDefault(int $isDefault): static
    {
        $this->isDefault = $isDefault;

        return $this;
    }

    public function getIsDel(): ?int
    {
        return $this->isDel;
    }

    public function setIsDel(int $isDel): static
    {
        $this->isDel = $isDel;

        return $this;
    }

    public function getCreateUser(): ?int
    {
        return $this->createUser;
    }

    public function setCreateUser(int $createUser): static
    {
        $this->createUser = $createUser;

        return $this;
    }

    public function getCreateTime(): ?int
    {
        return $this->createTime;
    }

    public function setCreateTime(int $createTime): static
    {
        $this->createTime = $createTime;

        return $this;
    }

    public function getUpdateUser(): ?int
    {
        return $this->updateUser;
    }

    public function setUpdateUser(int $updateUser): static
    {
        $this->updateUser = $updateUser;

        return $this;
    }

    public function getUpdateTime(): ?int
    {
        return $this->updateTime;
    }

    public function setUpdateTime(int $updateTime): static
    {
        $this->updateTime = $updateTime;

        return $this;
    }


}
